package org.mysocial.datamodel;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "notification")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public abstract class Notification implements Serializable
{
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long id;

	@Column(name = "isRead")
	private Boolean read;

	@OneToOne(fetch = FetchType.LAZY)
	private Account account;

	public Account getAccount()
	{
		return account;
	}

	public long getId()
	{
		return id;
	}

	public Boolean getRead()
	{
		return read;
	}

	public void setAccount(Account account)
	{
		this.account = account;
	}

	public void setId(long id)
	{
		this.id = id;
	}

	public void setRead(Boolean read)
	{
		this.read = read;
	}
}
